GDK W32: Implement show_window_menu()
authorРуслан Ижбулатов <lrn1986@gmail.com>
Fri, 18 Mar 2016 04:51:52 +0000 (04:51 +0000)
committerРуслан Ижбулатов <lrn1986@gmail.com>
Tue, 29 Mar 2016 13:47:49 +0000 (13:47 +0000)
commitcea8c29a267808c7252eed4f36547153509db308
tree8626e8640544037c99099649996ee7001c4e5b01
parent38f94194a62bc23eb7725e3692dc7a262e5b2e11
GDK W32: Implement show_window_menu()

This is achieved by sending undocumented message WM_SYSMENU
to the window.
Before doing that, the window is given WS_SYSMENU style
(to enable window menu) and some combination of
WS_MAXIMIZEBOX (for "Mazimize" item)
WS_MINIMIZEBOX (for "Minimize" item)
WS_SIZEBOX (for "Size" item)
depending on which operations are currently permissible.

WM_SYSMENU is processed by DefWindowProc(), which results
in showing the window menu. We remove extra styles
at the first opportunity (WM_INITMENU message), as they
alter the way our window is rendered.

https://bugzilla.gnome.org/show_bug.cgi?id=763851
gdk/win32/gdkevents-win32.c
gdk/win32/gdkprivate-win32.h
gdk/win32/gdkwindow-win32.c
gdk/win32/gdkwindow-win32.h